<form action="/admin/order-type/edit" data-toggle="ajaxform" data-options="{callback:closeCurrent}">
    <input type="hidden" name="id" value="{{$info['id']}}">
    <div class="bjui-row col-2">
        <div class="bjui-row col-2">
            <label class="row-label">工艺名称</label>
            <div class="row-input">
                <input type="text" name="title" value="{{$info['title']}}" placeholder="工艺名称">
            </div>
        </div>

        <div class="bjui-row col-2">
            <label class="row-label">分类</label>
            <div class="row-input required">
                <select name="category_id" id="category_id" data-toggle="selectpicker" data-rule="required">
                    <option value=""></option>
                    @foreach ($categoryList as $key => $value)
                        <option value="{{ $value['id'] }}" @if($value['id'] == $info['category_id']) selected @endif >{{ $value['cat_name'] }}</option>
                    @endforeach
                </select>
            </div>
        </div>
        <label class="row-label">工艺图片</label>
        <div class="row-input">
            <input type="file" data-name="img_id" data-id="img_id" data-toggle="webuploader" data-options="
                {
                    pick: {label: '点击选择图片'},
                    server: 'admin/photo/upload',
                    upname:'img_id',
                    fileNumLimit: 5,
                    formData: {_token : '{{ csrf_token() }}',path_type:3},
                    required: true,
                    uploaded: '{{$info['img_url']}}',
                    initUploaded: '{{$info['img_id']}}',
                    basePath: '',
                    accept: {
                        title: '图片',
                        extensions: 'jpg,png',
                        mimeTypes: '.jpg,.png'
                    }
                }">
        </div>
        <div class="bjui-row col-2">
            <label class="row-label"></label>
            <div class="row-input">
                <button type="submit" class="btn-default" data-icon="save">保存</button>
                <button type="button" class="btn-close" data-icon="close">取消</button>
            </div>
        </div>
    </div>
</form>
<script>
    function closeCurrent(){
        BJUI.dialog('closeCurrent')
    }
</script>